/*
 * gbdt_common.h
 *
 *  Created on: 2012-7-26
 *      Author: wanghaox
 */

#ifndef GBDT_COMMON_H_
#define GBDT_COMMON_H_

#include "stdio.h"
#include "base_obj.h"

enum GBDT_SYNC_STEP {
	GBDT_GATHER_BEGIN = 10000,
	GBDT_CHOOSE_FEATURE,
	GBDT_UPDATE_FEATURE,
	GBDT_GATHER_NODE_DIST,
	GBDT_SPREAD_NODE_DIST,
	GBDT_UPDATE_NODE_DIST,
};

class GbdtUpdater;
class GbdtSyncer;
class GbdtMessage;

class GbdtMessage: public Message {
public:
	enum GBDT_MSG_TYPE {
		GBDT_INIT_MSG = 0, GBDT_FEATURE_MSG, GBDT_NODE_DIST_MSG,
	};
public:
	bool pack(string &buffer);
	bool unpack(const string &buffer);

public:
	GBDT_MSG_TYPE msg_type;
	int layer;
	int node;
	int feature_id;
	int feature_loss;

public:

};

#endif /* GBDT_COMMON_H_ */
